home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-01-21 | 585 b | 31 lines |
- import ProcessEntry32;
- import java.util.*;
-
- class ToolHelp extends Object
- {
- static { System.loadLibrary("tlh"); }
- // Load the native system library
-
- final private int TH32CS_SNAPPROCESS = 2;
-
- private Vector ProcEntries;
- public ToolHelp()
- {
- ProcEntries = new Vector();
- CreateToolhelp32Snapshot(
- TH32CS_SNAPPROCESS,
- 0,
- ProcEntries);
- }
-
- public Vector getProcList()
- {
- return ProcEntries;
- }
-
- // native function declaration
- private native boolean CreateToolhelp32Snapshot(
- int dwFlags,
- int th32ProcessID,
- Vector vector);
- }